Jasper St. Pierre [Sat, 21 Jun 2014 22:01:40 +0000 (18:01 -0400)]
gdkwindow-broadway: Squash memory leak
We don't need to hang on to the update_area.
Jasper St. Pierre [Sat, 21 Jun 2014 21:59:48 +0000 (17:59 -0400)]
gdkwindow-broadway: Make queue_antiexpose implementation private
Jasper St. Pierre [Sat, 21 Jun 2014 21:29:08 +0000 (17:29 -0400)]
gdkwindow-wayland: Attach new buffers and submit damage in end_paint
process_updates_recurse is simply the wrong place for it to be.
Jasper St. Pierre [Sat, 21 Jun 2014 21:33:09 +0000 (17:33 -0400)]
gdkwindow-wayland: Rename listener -> frame_listener
Don't pollute the static namespace here.
Michael Catanzaro [Sat, 21 Jun 2014 17:15:42 +0000 (12:15 -0500)]
docs: add missing apostrophe
Jasper St. Pierre [Sat, 21 Jun 2014 15:25:16 +0000 (11:25 -0400)]
gdkwindow: Correct a signature
We removed the parameter from callers and from the implementation, but
not from the signature up top. I didn't notice because the branch I was
working on removed the signature entirely.
Jasper St. Pierre [Sat, 21 Jun 2014 14:33:40 +0000 (10:33 -0400)]
gdkwindow: Remove an extra region copy
This code is only called with the current paint region as its argument.
Instead of having to copy it and do a no-op intersect against itself,
just use the current paint directly.
Jasper St. Pierre [Sat, 21 Jun 2014 14:16:14 +0000 (10:16 -0400)]
gdkwindow: Clean up code
Introduce a temporary to make the code a bit more clear under these cases.
Jasper St. Pierre [Sat, 21 Jun 2014 14:16:58 +0000 (10:16 -0400)]
gdkwindow: Clean up formatting
Tabs to spaces, add some whitespace.
Jasper St. Pierre [Sat, 21 Jun 2014 13:58:20 +0000 (09:58 -0400)]
gdkwindow: Add some extra documentation to gdk_cairo_create
Mention the need to wrap the function inside
gdk_window_begin_paint_region and gdk_window_end_paint.
Benjamin Otte [Sat, 21 Jun 2014 13:38:38 +0000 (15:38 +0200)]
widgetpath: Deprecate regions
This is a foolowup to
d80bf0790d0903ba2825f306b6f7435529f922e2
Jasper St. Pierre [Sat, 21 Jun 2014 04:31:17 +0000 (00:31 -0400)]
gtkwidget: Add a warning about set_double_buffered
As requested on the mailing list.
Jasper St. Pierre [Sat, 21 Jun 2014 04:30:59 +0000 (00:30 -0400)]
testwindows: Remove another reference to set_double_buffered
Jasper St. Pierre [Sat, 21 Jun 2014 04:30:07 +0000 (00:30 -0400)]
gtktrayicon-x11: Stop using set_double_buffered
There's nothing better we can do for this case, now that we always
redirect drawing to a temporary pixmap. Maybe since this is already
X11-specific code, we should just do everything with Xlib directly.
Matthias Clasen [Sat, 21 Jun 2014 03:17:53 +0000 (23:17 -0400)]
Adwaita: Fix highlight on check buttons
The .button style class does not apply to check and radio
buttons, and .check only applies to menuitems.
Jasper St. Pierre [Sat, 21 Jun 2014 00:47:59 +0000 (20:47 -0400)]
gdkwindow: Squash a leak in the subsurface case
cairo_surface_create_for_rectangle takes a ref on the parent surface,
so we need to drop ours.
Rename get_window_surface to ref_window_surface to make the code more
clear and to stop this error from happening again.
Jasper St. Pierre [Sat, 21 Jun 2014 00:46:49 +0000 (20:46 -0400)]
gdkwindow: Don't create a subsurface if we don't need to
In the case we have a native window, we don't need to crop it to a
non-native subrectangle, as abs_x / abs_y / width / height are all 0.
Jasper St. Pierre [Sat, 21 Jun 2014 00:20:14 +0000 (20:20 -0400)]
gdkwindow: Remove the ability to call begin_paint_region more than once
Previously, each begin_paint_region added to a stack of current paints,
and when end_paint was called, the paint was popped off of the stack and
the surface was composited into the parent paint surface.
However, the code was broken in the case of a backend like Wayland which
didn't keep track of nested calls and simply wiped and returned the
native impl backing surface every time.
Since this feature is flat out unused by GTK+ and we don't want to
really support tricksy things like these for other clients, just remove
the feature. If somebody does call begin_paint_region more than once,
warn and return without doing anything.
Jasper St. Pierre [Fri, 20 Jun 2014 15:55:09 +0000 (11:55 -0400)]
gdkwindow: Remove the internal cairo_surface used for out-of-band painting
Traditionally, the way painting was done in GTK+ was with the
"expose-event" handler, where you'd use GDK methods to do drawing on
your surface. In GTK+ 2.24, we added cairo support with gdk_cairo_create,
so you could paint your graphics with cairo.
Since then, we've added client-side windows, double buffering, the paint
clock, and various other enhancements, and the modern way to do drawing
is to connect to the "draw" signal on GtkWidget, which hands you a
cairo_t. To do double-buffering, the cairo_t we hand you is actually on
a secret surface, not the actual backing store of the window, and when
the draw handler completes we blit it into the main backing store
atomically.
The code to do this is with the APIs gdk_window_begin_paint_region,
which creates the temporary surface, and gdk_window_end_paint which
blits it back into the backing store. GTK+'s implementation of the
"draw" signal uses these APIs.
We've always sort-of supported people calling gdk_cairo_create
"outside" of a begin_paint / end_paint like old times, but then you're
not getting the benefit of double-buffering, and it's harder for GDK to
optimize.
Additionally, newer backends like Mir and Wayland can't actually support
this model, since they're based on double-buffering and swapping buffers
at various points in time. If we hand you a random cairo_t, we have no
idea when is a good time to swap.
Remove support for this.
This is technically a GDK API break: a warning is added in cases where
gdk_cairo_create is called outside of a paint cycle, and the returned
surface is a dummy that won't ever be composited back onto the main
surface. Testing with complex applications like Ardour didn't produce
any warnings.
Jasper St. Pierre [Fri, 20 Jun 2014 15:11:24 +0000 (11:11 -0400)]
gtkwidget: Widgets are now always double-buffered
gtk_widget_set_double_buffered is now deprecated, and we don't support
non-double-buffered widgets. This means that under normal circumstances,
paints are never outside of a begin_paint / end_paint sequence, which
natively-double-buffered backends like Wayland can't possibly support.
Jasper St. Pierre [Fri, 20 Jun 2014 15:09:42 +0000 (11:09 -0400)]
gdkwindow: Deprecate gdk_window_flush
The function does nothing.
Matthias Clasen [Fri, 20 Jun 2014 19:46:25 +0000 (15:46 -0400)]
GtkIconTheme: Drop an unused function
Matthias Clasen [Fri, 20 Jun 2014 19:26:15 +0000 (15:26 -0400)]
GtkIconTheme: Small cleanup
Make the default symbolic colors a little more readable in the code.
Matthias Clasen [Fri, 20 Jun 2014 19:17:18 +0000 (15:17 -0400)]
GtkIconTheme: Trivial cleanup
Drop the _-prefix from a static function.
We've agreed to no stop using those prefixes.
Matthias Clasen [Fri, 20 Jun 2014 18:17:24 +0000 (14:17 -0400)]
Avoid a compiler warning
The name_offset variable is indeed unused.
Matthias Clasen [Wed, 18 Jun 2014 17:36:23 +0000 (13:36 -0400)]
Big spinner
Matthias Clasen [Fri, 20 Jun 2014 16:11:55 +0000 (12:11 -0400)]
GtkIconTheme: Don't create empty IconThemeDir structs
Starting gtk3-demo currently creates ~1200 of these, most
of them for nonexisting directories. Lets try to avoid that.
Matthias Clasen [Fri, 20 Jun 2014 16:11:22 +0000 (12:11 -0400)]
GtkIconCache: Add api to find if directories are empty
This will help in not creating structs for tons of empty
directories.
Matthias Clasen [Fri, 20 Jun 2014 15:44:51 +0000 (11:44 -0400)]
GtkStatusbar: Add some space between the frame and the label
Looks better this way.
Lapo Calamandrei [Fri, 20 Jun 2014 15:25:19 +0000 (17:25 +0200)]
Adwaita: check/radio selector simplification
Matthias Clasen [Fri, 20 Jun 2014 15:13:33 +0000 (11:13 -0400)]
widget factory: Use a property action for the toolbar toggle
This is slightly more elegant than doing it manually.
Matthias Clasen [Fri, 20 Jun 2014 15:10:22 +0000 (11:10 -0400)]
widget factory: Add a statusbar
A widget that is not represented in the widget factory is likely
to not get proper attention from theme authors.
Matthias Clasen [Fri, 20 Jun 2014 14:53:36 +0000 (10:53 -0400)]
docs: Drop image references for stock items
Most of those images are no longer in our tree, so just
say which ones have icons and rtl variants, instead of
showing it.
Jasper St. Pierre [Fri, 20 Jun 2014 12:55:19 +0000 (08:55 -0400)]
wayland: Prevent stale paints and weird artifacts when using Weston
Weston releases buffers almost immediately after they're done, which
means that GTK+ doesn't use a temporary surface and instead paints
directly onto the SHM backing store that Weston will use.
Normally, after painting to the temporary surface, GTK+ *replaces*
the existing backing surface with CAIRO_OPERATOR_SOURCE. However,
if we immediately paint to the backing surface, it might have junk
from the last paint in it. So clear out the backing surface whenever
somebody calls begin_paint_region().
Maybe we should just always use the temporary surface like the X11
codepath, since that prevents us from having to do weird things like
this, but oh well.
Matthias Clasen [Fri, 20 Jun 2014 12:50:31 +0000 (08:50 -0400)]
GtkIconTheme: Keep gtk_icon_theme_add_resource_path private for now
We need to discuss some details of the semantics before
we can make this public.
Matthias Clasen [Fri, 20 Jun 2014 12:46:42 +0000 (08:46 -0400)]
Revert "Document gtk_icon_theme_add_resource_path"
This reverts commit
988b6b483dc9c21d050161d26652bb1006b9c686.
Matthias Clasen [Fri, 20 Jun 2014 12:46:24 +0000 (08:46 -0400)]
Revert "Deprecate gtk_icon_theme_add_builtin_icon"
This reverts commit
923eeda2d3cae13d02b0a9d2e5774b12eed999e0.
Matthias Clasen [Fri, 20 Jun 2014 04:49:25 +0000 (00:49 -0400)]
Deprecate gtk_icon_theme_add_builtin_icon
Matthias Clasen [Fri, 20 Jun 2014 04:46:09 +0000 (00:46 -0400)]
Document gtk_icon_theme_add_resource_path
Matthias Clasen [Fri, 20 Jun 2014 04:39:59 +0000 (00:39 -0400)]
Adapt the icontheme tests
With the new way of dealing with the legacy stock icons,
the builtin test needed some small updates.
Matthias Clasen [Fri, 20 Jun 2014 05:04:16 +0000 (01:04 -0400)]
GtkIconTheme: Include legacy stock icons from resources
Add /org/gtk/libgtk/icons as a resource path, and ensure
that we always parse an index.theme file for hicolor which
makes the builtin icons available as part of the hicolor theme.
Matthias Clasen [Fri, 20 Jun 2014 04:35:57 +0000 (00:35 -0400)]
GtkIconTheme: Allow loading icons from resources
We add a new API, gtk_icon_theme_add_resource_path, which
can be used to add resource path as a base location for
icon theme content, similar to gtk_icon_theme_append_search_path.
Matthias Clasen [Fri, 20 Jun 2014 01:39:45 +0000 (21:39 -0400)]
GtkIconTheme: Drop the all_icons hash table
It is not used anywhere anymore.
Matthias Clasen [Fri, 20 Jun 2014 01:37:01 +0000 (21:37 -0400)]
GtkIconTheme: Stop using the all_icons hash table
This hash table was used in gtk_icon_theme_has_icon; we can
implement that function just as well without it and save some
memory.
Matthias Clasen [Fri, 20 Jun 2014 00:56:06 +0000 (20:56 -0400)]
icontheme: Add some more tests
This test checks that gtk_icon_theme_list_icons and
gtk_icon_theme_has_icon work as expected.
Matthias Clasen [Thu, 19 Jun 2014 23:42:53 +0000 (19:42 -0400)]
Formatting fixes
Matthias Clasen [Wed, 18 Jun 2014 02:36:44 +0000 (22:36 -0400)]
GtkIconTheme: Drop the code for parsing .icon files
Modern icon themes don't ship .icon files anyway.
Matthias Clasen [Wed, 18 Jun 2014 02:23:19 +0000 (22:23 -0400)]
GtkIconTheme: Deprecate functionality related to .icon files
This functionality is not used at all in modern icon themes.
Matthias Clasen [Wed, 18 Jun 2014 02:06:08 +0000 (22:06 -0400)]
Drop the builtin icon cache
We don't need it anymore, now that the non-standard stock icons
are using resources.
Matthias Clasen [Wed, 18 Jun 2014 01:32:50 +0000 (21:32 -0400)]
Add non-standard stock icons as resources
This will allow us to remove the builtin icon cache in the future
while keeping the deprecated stock icons working.
Matthias Clasen [Tue, 17 Jun 2014 23:17:36 +0000 (19:17 -0400)]
Drop all standard icons from the builtin icontheme
We're going to require a complete icon theme, and we have
a test that checks for all the icons we use, so there is
no need to include all these fallback icons.
Benjamin Otte [Thu, 19 Jun 2014 18:00:16 +0000 (20:00 +0200)]
stylecontext: Deprecate regions
Regions are done in a very non-css way. They don't fit the DOM in that
they don't integrate into the CSS tree and they have very weird matching
behavior in selectors.
So I'm deprecating them now. GtkNotebook and GtkTreeview will continue
to use them and as long as they do, we can't remove the code for it.
But once those are ported it might be safe to remove the code as it will
clean up lots of places in the code by quite a bit.
Benjamin Otte [Thu, 19 Jun 2014 17:46:52 +0000 (19:46 +0200)]
stylecontext: Remove long outdated docs
The part about transition animations doesn't apply since 3.8.
Jasper St. Pierre [Thu, 19 Jun 2014 19:04:09 +0000 (15:04 -0400)]
gdkwindow-wayland: Destroy the wl_surface too when hiding a window
wl_surfaces can't switch roles, so destroying the xdg_surface but not
the wl_surface means that we could get an error when trying to re-map
the surface.
We could fix this by not destroying the xdg resource and only do it at
finalization time, but it's just as easy to just create a new wl_surface.
Jasper St. Pierre [Thu, 19 Jun 2014 19:10:01 +0000 (15:10 -0400)]
gdkwindow-wayland: Destroy the xdg roles before the wl_surface
Since the xdg roles are a special case of the surface, some compositors
like Weston destroy them automatically when the wl_surface is destroyed.
Thus, we need to destroy these first.
Jasper St. Pierre [Thu, 19 Jun 2014 18:55:04 +0000 (14:55 -0400)]
gdkwindow-wayland: Add a forgotten ref
Jasper St. Pierre [Thu, 19 Jun 2014 18:34:22 +0000 (14:34 -0400)]
gdkwindow-wayland: Another slight rearrange
Jasper St. Pierre [Thu, 19 Jun 2014 18:33:35 +0000 (14:33 -0400)]
gdkwindow-wayland: Pair a ref with its owner
Jasper St. Pierre [Thu, 19 Jun 2014 18:31:23 +0000 (14:31 -0400)]
gdkwindow-wayland: Don't post CONFIGURE events for the same size
The Wayland compositor is completely allowed to send us configure
events for the same size, and this validly happens if we're changing
states. Fizzle these out.
Matthias Clasen [Thu, 19 Jun 2014 17:51:25 +0000 (13:51 -0400)]
GtkTreeView: Remove a no-longer-valid optimization
The rubberband rendering code was assuming that we just have
a 1-pixel border and the rest of the rubberband is uniform.
That is not a safe assumption to make with css-styled
rubberbands, so remove it.
Matthias Clasen [Thu, 19 Jun 2014 17:50:28 +0000 (13:50 -0400)]
GtkIconView: Remove a no-longer-valid optimization
The rubberband rendering code was assuming that we just have
a 1-pixel border and the rest of the rubberband is uniform.
That is not a safe assumption to make with css-styled
rubberbands, so remove it.
Matthias Clasen [Thu, 19 Jun 2014 16:54:31 +0000 (12:54 -0400)]
Install the new icontheme test files
Lapo Calamandrei [Thu, 19 Jun 2014 17:11:02 +0000 (19:11 +0200)]
Adwaita: fix rubberband selection
Jasper St. Pierre [Thu, 19 Jun 2014 15:13:17 +0000 (11:13 -0400)]
Update Makefile.am for one more gitignore rule
Jasper St. Pierre [Thu, 19 Jun 2014 14:16:22 +0000 (10:16 -0400)]
Update git.mk
Matthias Clasen [Wed, 18 Jun 2014 22:21:51 +0000 (18:21 -0400)]
GtkIconTheme: Fix svg loading with FORCE_SIZE
Paradoxically, we were loading svgs at the nominal size when
FORCE_SIZE is specified, while scaling them exactly when it
isn't.
../build/win32/vs10/gtk.vcxproj
Matthias Clasen [Wed, 18 Jun 2014 22:19:39 +0000 (18:19 -0400)]
Add more icon theme tests
This test checks various directory size behaviours, with and
without the FORCE_SIZE flag.
Jakub Steiner [Wed, 18 Jun 2014 17:40:11 +0000 (19:40 +0200)]
Adwaita: hover state for horizontal spinbuttons
Nikita Churaev [Wed, 18 Jun 2014 16:09:43 +0000 (20:09 +0400)]
New window shadows
https://bugzilla.gnome.org/show_bug.cgi?id=731866
Lapo Calamandrei [Wed, 18 Jun 2014 17:38:14 +0000 (19:38 +0200)]
Adwaita: highligh not hilight...
Lapo Calamandrei [Wed, 18 Jun 2014 17:29:33 +0000 (19:29 +0200)]
Adwaita: remove wildcard for image effect
-gtk-image-effect: hilight now is set for .button:hover
Lapo Calamandrei [Wed, 18 Jun 2014 16:13:38 +0000 (18:13 +0200)]
Adwaita: calendar fixes
Matthias Clasen [Wed, 18 Jun 2014 15:49:00 +0000 (11:49 -0400)]
GtkHeaderBar: Don't forget to show the subtitle
https://bugzilla.gnome.org/show_bug.cgi?id=731790
Jakub Steiner [Wed, 18 Jun 2014 14:36:00 +0000 (16:36 +0200)]
Adwaita: flatten buttons slightly.
- gets rid of the specialcase for dark too.
Lapo Calamandrei [Wed, 18 Jun 2014 14:07:59 +0000 (16:07 +0200)]
Adwaita: more links styling
Lars Uebernickel [Wed, 18 Jun 2014 11:25:02 +0000 (13:25 +0200)]
themes: use .popover class instead of GtkPopover
https://bugzilla.gnome.org/show_bug.cgi?id=731834
Lars Uebernickel [Wed, 18 Jun 2014 11:13:30 +0000 (13:13 +0200)]
gtkpopover: set background and popover css classes
https://bugzilla.gnome.org/show_bug.cgi?id=731834
Lapo Calamandrei [Wed, 18 Jun 2014 11:26:35 +0000 (13:26 +0200)]
Adwaita: remove bg from insensitive backdrop spinbutton buttons
Lapo Calamandrei [Wed, 18 Jun 2014 11:16:21 +0000 (13:16 +0200)]
Adwaita: vertical spinbuttons inhert in backdrop state
Jakub Steiner [Wed, 18 Jun 2014 10:16:55 +0000 (12:16 +0200)]
Adwaita: actionbars' padding
Lapo Calamandrei [Wed, 18 Jun 2014 10:08:04 +0000 (12:08 +0200)]
Adwaita: reorderable tabs correctly styled for every notebook layout
Lapo Calamandrei [Wed, 18 Jun 2014 08:21:13 +0000 (10:21 +0200)]
Adwaita: set outline-color on selected items
Lapo Calamandrei [Wed, 18 Jun 2014 08:11:11 +0000 (10:11 +0200)]
Adwaita: checks and radios text focus ring fix.
Lapo Calamandrei [Wed, 18 Jun 2014 08:01:24 +0000 (10:01 +0200)]
Adwaita: minor fixes.
Lapo Calamandrei [Wed, 18 Jun 2014 07:52:29 +0000 (09:52 +0200)]
Adwaita: .scrollbars-junction
Yosef Or Boczko [Wed, 18 Jun 2014 00:12:40 +0000 (03:12 +0300)]
Updated Hebrew properties translation
Matthias Clasen [Tue, 17 Jun 2014 20:26:42 +0000 (16:26 -0400)]
Include image data in the builtin icon theme cache
When we switched the default for gtk-update-icon-cache to
not include image data, we should have thought about the
builtin icons. For them, we rely on image data being included.
This made the notify test fail in gnome-continuous, where we
build from git and always regenerate the builtin cache.
Matthias Clasen [Tue, 17 Jun 2014 18:38:18 +0000 (14:38 -0400)]
Add a test for builtin icons
We want to get rid of these, but as long as we still have them,
make sure they work.
Alexander Larsson [Tue, 17 Jun 2014 16:05:22 +0000 (18:05 +0200)]
icon theme: Fix crash for builtin icons
This pushes the initialization of is_svg to an earlier point
when the GtkIconInfo is created. This is needed because an icon
info doesn't necessarily always have a filename that we can later
extract the suffix from. For instance, builtin icons have NULL
filename.
https://bugzilla.gnome.org/show_bug.cgi?id=721895
Jakub Steiner [Tue, 17 Jun 2014 13:55:58 +0000 (15:55 +0200)]
Adwaita: selection mode buttons to have borders and fill
Jakub Steiner [Tue, 17 Jun 2014 13:41:59 +0000 (15:41 +0200)]
Adwaita: symbolic checkboxes for selection mode.
Jakub Steiner [Tue, 17 Jun 2014 13:39:45 +0000 (15:39 +0200)]
Adwaita: make bash actually call sass
Chun-wei Fan [Tue, 17 Jun 2014 09:53:36 +0000 (17:53 +0800)]
Visual Studio Builds: "Install" the Stock Icons
Copy the icons in stock_icons accordingly, so that the built-in icons can
be found by GTK, as it seems that not all of them are built into
gtkbuiltincache.h.
Benjamin Otte [Mon, 16 Jun 2014 20:20:08 +0000 (22:20 +0200)]
testsuite: Add test for latest commit
Benjamin Otte [Mon, 16 Jun 2014 20:13:07 +0000 (22:13 +0200)]
cssprovider: Names starting with -gtk- aren't style props
We want to have the "-gtk-" prefix for our custom CSS properties. But
we also want to parse names starting with a "-" as style properties.
So make sure that "-gtk-" is treated like a normal property and we emit
errors when somebody uses it wrong.
This is to catch errors with people typing
-gtk-iconsource: none;
instead of the correct
-gtk-icon-source: none;
Matthias Clasen [Mon, 16 Jun 2014 21:31:56 +0000 (17:31 -0400)]
Revert "gtkbin: replace internal api"
This reverts commit
0f4751c08e22a4f45d58e2368e4ae82df407d330.
This causes warnings from the notebook and combobox code.
Piotr Drąg [Mon, 16 Jun 2014 20:12:39 +0000 (22:12 +0200)]
Updated POTFILES.skip
Ryan Lortie [Mon, 16 Jun 2014 18:26:21 +0000 (14:26 -0400)]
menu binding: emit submenu close after activate
We want to make sure that the submenu action is changed back to FALSE
_after_ the menu item has been activated. This prevents the menu
teardown handler from deleting the menu item before it can be activated.
Unfortunately, GtkMenuShell emits "hide" before the item activation.
This is probably done to prevent the application from doing things like
showing dialogs when the menu is still holding the grab.
In the case where we are doing an activate, set a boolean flag on each
of the open menus (following the parent stack) indicating that we'll be
emitting another signal soon (selection done). If that flag is set, we
defer the setting of the submenu action until we receive the second
signal.
https://bugzilla.gnome.org/show_bug.cgi?id=729820
Jasper St. Pierre [Mon, 16 Jun 2014 17:08:48 +0000 (13:08 -0400)]
Makefile: Add a few more cleanfile / ignore rules
Jasper St. Pierre [Mon, 16 Jun 2014 17:04:30 +0000 (13:04 -0400)]
Makefile: Add gtk.gresource.xml to gitignore